package com.yanghui.dao;

import com.yanghui.pojo.Visit;
import com.yanghui.pojo.VisitExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface VisitMapper {
    long countByExample(VisitExample example);

    int deleteByExample(VisitExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Visit record);

    int insertSelective(Visit record);

    List<Visit> selectByExample(VisitExample example);

    Visit selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Visit record, @Param("example") VisitExample example);

    int updateByExample(@Param("record") Visit record, @Param("example") VisitExample example);

    int updateByPrimaryKeySelective(Visit record);

    int updateByPrimaryKey(Visit record);

    /**
     * 按照IP分组查询 用户数量以及查询总记录数
     */
    List<?> selectVisitListByIp();

    /**
     * 按照指定的条件查询访问者数据
     */
    List<Visit> selectLikeVisitListByPage(VisitExample visitExample);

    /**
     * 按照IP分组
     */
    List<?> selectLikeVisitListGroupByIp(Map<String, Object> map);

    /**
     * 按照指定日期查询访客记录
     */
    List<?> selectVisitListByDate(Map<String, Object> map);

    Visit findVisitTimes(Visit visit);
}